package cn.bandeqing.frame.exception;

import cn.bandeqing.base.exception.BaseException;
import lombok.Getter;
import org.dromara.hutool.http.meta.HttpStatus;

@Getter
public class CodeException extends BaseException {

    private final Integer errorCode;

    public CodeException(String errorMessage) {
        super(errorMessage);
        errorCode = HttpStatus.HTTP_INTERNAL_ERROR;
    }

    public CodeException() {
        super("server error");
        errorCode = HttpStatus.HTTP_INTERNAL_ERROR;
    }

    public CodeException(Integer errorCode, String errorMessage) {
        super(errorMessage);
        this.errorCode = errorCode;
    }

}
